package org.tempuri;

public class IRWFleetEngineProxy implements org.tempuri.IRWFleetEngine {
  private String _endpoint = null;
  private org.tempuri.IRWFleetEngine iRWFleetEngine = null;
  
  public IRWFleetEngineProxy() {
    _initIRWFleetEngineProxy();
  }
  
  public IRWFleetEngineProxy(String endpoint) {
    _endpoint = endpoint;
    _initIRWFleetEngineProxy();
  }
  
  private void _initIRWFleetEngineProxy() {
    try {
      iRWFleetEngine = (new org.tempuri.IRWFleetEngineserviceLocator()).getIRWFleetEnginePort();
      if (iRWFleetEngine != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)iRWFleetEngine)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)iRWFleetEngine)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (iRWFleetEngine != null)
      ((javax.xml.rpc.Stub)iRWFleetEngine)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public org.tempuri.IRWFleetEngine getIRWFleetEngine() {
    if (iRWFleetEngine == null)
      _initIRWFleetEngineProxy();
    return iRWFleetEngine;
  }
  
  public java.lang.String optimizeStart(java.lang.String aInputXml) throws java.rmi.RemoteException{
    if (iRWFleetEngine == null)
      _initIRWFleetEngineProxy();
    return iRWFleetEngine.optimizeStart(aInputXml);
  }
  
  public boolean optimizeStop(java.lang.String aTaskId) throws java.rmi.RemoteException{
    if (iRWFleetEngine == null)
      _initIRWFleetEngineProxy();
    return iRWFleetEngine.optimizeStop(aTaskId);
  }
  
  public FleetEngineIntf.StatusInfo getStatus(java.lang.String aTaskId) throws java.rmi.RemoteException{
    if (iRWFleetEngine == null)
      _initIRWFleetEngineProxy();
    return iRWFleetEngine.getStatus(aTaskId);
  }
  
  public java.lang.String getResult(java.lang.String aTaskID) throws java.rmi.RemoteException{
    if (iRWFleetEngine == null)
      _initIRWFleetEngineProxy();
    return iRWFleetEngine.getResult(aTaskID);
  }
  
  public FleetEngineIntf.StatusInfo[] getStatusAll() throws java.rmi.RemoteException{
    if (iRWFleetEngine == null)
      _initIRWFleetEngineProxy();
    return iRWFleetEngine.getStatusAll();
  }
  
  
}